// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ocv.comp.Source.pas' rev: 30.00 (Windows)

#ifndef Ocv_Comp_SourceHPP
#define Ocv_Comp_SourceHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <System.SyncObjs.hpp>
#include <ocv.core.types_c.hpp>
#include <ocv.highgui_c.hpp>
#include <ocv.comp.Types.hpp>
#include <ocv.lock.hpp>

//-- user supplied -----------------------------------------------------------

namespace Ocv
{
namespace Comp
{
namespace Source
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TocvCustomSourceThread;
class DELPHICLASS TocvCustomSource;
class DELPHICLASS TocvCaptureSource;
class DELPHICLASS TocvCameraSource;
class DELPHICLASS TocvFileSource;
class DELPHICLASS TocvIPCamSource;
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TocvCameraCaptureSource : unsigned char { CAP_ANY, CAP_CAM_0, CAP_CAM_1, CAP_CAM_2, CAP_CAM_3, CAP_CAM_4, CAP_CAM_5, CAP_MIL, CAP_VFW, CAP_V4L, CAP_V4L2, CAP_FIREWARE, CAP_FIREWIRE, CAP_IEEE1394, CAP_DC1394, CAP_CMU1394, CAP_STEREO, CAP_TYZX, TYZX_LEFT, TYZX_RIGHT, TYZX_COLOR, TYZX_Z, CAP_QT, CAP_UNICAP, CAP_DSHOW, CAP_PVAPI, CAP_OPENNI, CAP_OPENNI_ASUS, CAP_ANDROID, CAP_XIAPI, CAP_AVFOUNDATION };

class PASCALIMPLEMENTATION TocvCustomSourceThread : public System::Classes::TThread
{
	typedef System::Classes::TThread inherited;
	
private:
	Ocv::Comp::Types::TOnOcvNotify FOnNotifyData;
	System::Classes::TNotifyEvent FOnNoData;
	int FThreadDelay;
	Ocv::Lock::TOCVLock* FLock;
	
public:
	__fastcall TocvCustomSourceThread(bool CreateSuspended);
	__fastcall virtual ~TocvCustomSourceThread(void);
	__property System::Classes::TNotifyEvent OnNoData = {read=FOnNoData, write=FOnNoData};
	__property Ocv::Comp::Types::TOnOcvNotify OnNotifyData = {read=FOnNotifyData, write=FOnNotifyData};
	__property int ThreadDelay = {read=FThreadDelay, write=FThreadDelay, nodefault};
};


class PASCALIMPLEMENTATION TocvCustomSource : public Ocv::Comp::Types::TocvDataSource
{
	typedef Ocv::Comp::Types::TocvDataSource inherited;
	
protected:
	TocvCustomSourceThread* FSourceThread;
	int FThreadDelay;
	bool FEnabled;
	virtual void __fastcall OnNotifyData(System::TObject* Sender, Ocv::Comp::Types::_di_IocvImage &IplImage);
	virtual void __fastcall SetEnabled(bool Value);
	virtual bool __fastcall GetEnabled(void);
	virtual void __fastcall TerminateSourceThread(void);
	
private:
	Ocv::Comp::Types::TOnOcvNotify FOnImage;
	virtual void __fastcall ReleaseSource(void);
	
public:
	__fastcall virtual TocvCustomSource(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TocvCustomSource(void);
	
__published:
	__property bool Enabled = {read=GetEnabled, write=SetEnabled, default=0};
	__property Ocv::Comp::Types::TOnOcvNotify OnImage = {read=FOnImage, write=FOnImage};
	__property int ImageWidth = {read=GetWidth, nodefault};
	__property int ImageHeight = {read=GetHeight, nodefault};
	__property double FPS = {read=GetFPS};
};


typedef Ocv::Highgui_c::pCvCapture TcsVideoCapture;

class PASCALIMPLEMENTATION TocvCaptureSource : public TocvCustomSource
{
	typedef TocvCustomSource inherited;
	
protected:
	Ocv::Highgui_c::TCvCapture *FCapture;
	virtual void __fastcall Loaded(void);
	
private:
	virtual void __fastcall ReleaseSource(void);
	
public:
	__fastcall virtual TocvCaptureSource(System::Classes::TComponent* AOwner);
public:
	/* TocvCustomSource.Destroy */ inline __fastcall virtual ~TocvCaptureSource(void) { }
	
};


enum DECLSPEC_DENUM TocvResolution : unsigned char { r160x120, r320x240, r424x240, r640x360, r800x448, r960x544, r1280x720, rCustom };

class PASCALIMPLEMENTATION TocvCameraSource : public TocvCaptureSource
{
	typedef TocvCaptureSource inherited;
	
protected:
	virtual void __fastcall SetEnabled(bool Value);
	
private:
	TocvCameraCaptureSource FCaptureSource;
	TocvResolution FResolution;
	unsigned FCustomHeight;
	unsigned FCustomWidth;
	void __fastcall SetCameraSource(const TocvCameraCaptureSource Value);
	void __fastcall SetResolution(const TocvResolution Value);
	void __fastcall SetCameraResolution(void);
	
public:
	__fastcall virtual TocvCameraSource(System::Classes::TComponent* AOwner);
	
__published:
	__property TocvCameraCaptureSource Camera = {read=FCaptureSource, write=SetCameraSource, default=0};
	__property TocvResolution Resolution = {read=FResolution, write=SetResolution, default=0};
	__property unsigned CustomWidth = {read=FCustomWidth, write=FCustomWidth, default=0};
	__property unsigned CustomHeight = {read=FCustomHeight, write=FCustomHeight, default=0};
public:
	/* TocvCustomSource.Destroy */ inline __fastcall virtual ~TocvCameraSource(void) { }
	
};


class PASCALIMPLEMENTATION TocvFileSource : public TocvCaptureSource
{
	typedef TocvCaptureSource inherited;
	
protected:
	virtual void __fastcall SetEnabled(bool Value);
	void __fastcall OnNoData(System::TObject* Sender);
	
private:
	System::Sysutils::TFileName FFileName;
	bool FLoop;
	System::Classes::TNotifyEvent FOnEndOfFile;
	int FDelay;
	void __fastcall SetFileName(const System::Sysutils::TFileName Value);
	void __fastcall SetDelay(const int Value);
	
public:
	__fastcall virtual TocvFileSource(System::Classes::TComponent* AOwner);
	
__published:
	__property int Delay = {read=FDelay, write=SetDelay, default=40};
	__property System::Sysutils::TFileName FileName = {read=FFileName, write=SetFileName};
	__property bool Loop = {read=FLoop, write=FLoop, default=1};
	__property System::Classes::TNotifyEvent OnEndOfFile = {read=FOnEndOfFile, write=FOnEndOfFile};
public:
	/* TocvCustomSource.Destroy */ inline __fastcall virtual ~TocvFileSource(void) { }
	
};


enum DECLSPEC_DENUM TocvIPProtocol : unsigned char { ippHTTP, ippHTTPS, ippRTSP };

class PASCALIMPLEMENTATION TocvIPCamSource : public TocvCaptureSource
{
	typedef TocvCaptureSource inherited;
	
private:
	System::Word FPort;
	System::UnicodeString FPassword;
	System::UnicodeString FIP;
	System::UnicodeString FUserName;
	System::UnicodeString FURI;
	TocvIPProtocol FProtocol;
	
protected:
	System::AnsiString __fastcall GetIPCamTarget(void)/* overload */;
	bool __fastcall GetIPCamTarget(System::AnsiString &URL)/* overload */;
	virtual void __fastcall SetEnabled(bool Value);
	
public:
	__fastcall virtual TocvIPCamSource(System::Classes::TComponent* AOwner);
	
__published:
	__property System::UnicodeString UserName = {read=FUserName, write=FUserName};
	__property System::UnicodeString Password = {read=FPassword, write=FPassword};
	__property System::UnicodeString IP = {read=FIP, write=FIP};
	__property System::UnicodeString URI = {read=FURI, write=FURI};
	__property System::Word Port = {read=FPort, write=FPort, default=554};
	__property TocvIPProtocol Protocol = {read=FProtocol, write=FProtocol, default=2};
public:
	/* TocvCustomSource.Destroy */ inline __fastcall virtual ~TocvIPCamSource(void) { }
	
};


typedef System::StaticArray<System::AnsiString, 3> Ocv_Comp_Source__7;

//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE Ocv_Comp_Source__7 IPProtocolString;
}	/* namespace Source */
}	/* namespace Comp */
}	/* namespace Ocv */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_OCV_COMP_SOURCE)
using namespace Ocv::Comp::Source;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_OCV_COMP)
using namespace Ocv::Comp;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_OCV)
using namespace Ocv;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Ocv_Comp_SourceHPP
